import { Modal } from 'antd';

interface WindowModalProps {
    title?: string; //标题
    footer?: boolean //底部确定取消按钮
    open?: boolean //对话框是否可见
    width: number //对话框宽度
    confirmLoading?: boolean //确定按钮 loading
    onCancel?: any //关闭对话框回调
    children?: any
}

export const WindowModal = (props: WindowModalProps) => {
    const { title, footer, open, width, confirmLoading, onCancel, children } = props
    return (
        <Modal
            title={title}
            footer={footer}
            open={open}
            width={width}
            confirmLoading={confirmLoading}
            onCancel={onCancel}
        >
            {children}
        </Modal>
    )
}
